<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<html>
	<head>
		<title>Edit Debug</title>
		<link href="<s:url value="/css/admin.css"/>" rel="stylesheet"
			type="text/css">
		<s:head />
	</head>
	<body>
		<s:form action="updatedebug" method="post" name="frm">
			<s:hidden name="debug.id"/>
			<s:hidden name="debug.type" />
			<center>
				<b>Edit Debug</b>
			</center>
			<br>
			<table width="50%" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td>
						<s:actionerror />
						<s:fielderror />
					</td>
				</tr>
			</table>
			<table width="70%" border="1" align="center" cellpadding="0"
				cellspacing="0" style="border-collapse:collapse ">
				<tr>
					<td width="25%" height="25" align="right">
						Title:
					</td>
					<td width="75%">
						<s:textfield name="debug.title" />
					</td>
				</tr>
				<tr>
					<td height="25" align="right">
						Tester:
					</td>
					<td>
						<s:select list="userList" listKey="userid" listValue="name"
							headerKey="" headerValue="[select a tester]" name="debug.user" />
					</td>
				</tr>
				<tr>
					<td height="25" align="right">
						Audit Date:
					</td>
					<td>
						<s:datetimepicker name="debug.auditDate"
							displayFormat="yyyy-MM-dd" />
					</td>
				</tr>
				<tr>
					<td height="25" align="right">
						Type:
					</td>
					<td>
						<s:property value="@com.debug.config.Constant@getString(debug.type)"/>
					</td>
				</tr>
				  <tr>
				    <td height="25" align="right">System:</td>
				    <td><s:select list="%{config.getSystem()}" headerKey="-1" headerValue="[select a system]" name="debug.system"/> </td>
				  </tr>
				<tr align="center">
					<td height="25" colspan="2">
						Details
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<s:if
							test="%{debug.type==@com.debug.config.Constant@DEBUG_TYPE_BUG}">
							<table width="100%" border="1" cellpadding="0" cellspacing="0"
								style="border-collapse:collapse ">
								<tr>
									<td width="22%" height="25" align="right">
										Description:
									</td>
									<td width="78%">
										<s:textarea name="debug.description" cols="50" rows="8"/>
									</td>
								</tr>
								<tr>
									<td height="25" align="right">
										Level:
									</td>
									<td>
										<s:select list="@com.debug.config.Constant@BUG_LEVEL_MAP"
											name="debug.level" headerKey="-1" headerValue="[select a level]"/>
									</td>
								</tr>
							</table>
						</s:if>
						<s:elseif
							test="%{debug.type==@com.debug.config.Constant@DEBUG_TYPE_ADVISORY}">
							<table width="100%" border="1" cellpadding="0" cellspacing="0"
								style="border-collapse:collapse ">
								<tr>
									<td width="22%" height="25" align="right">
										Content:
									</td>
									<td width="78%">
										<s:textarea name="debug.content" cols="50" rows="8"/>
									</td>
								</tr>
								<tr>
									<td height="25" align="right">
										Contract:
									</td>
									<td>
										<s:select list="@com.debug.config.Constant@ADVISORY_MODE_MAP"
											name="debug.mode" headerKey="-1" headerValue="select a mode"/>
									</td>
								</tr>
							</table>
						</s:elseif>
						<s:elseif
							test="%{debug.type==@com.debug.config.Constant@DEBUG_TYPE_UPDATE}">
							<table width="100%" border="1" cellpadding="0" cellspacing="0"
								style="border-collapse:collapse ">
								<tr>
									<td width="22%" height="25" align="right">
										Original Function:
									</td>
									<td width="78%">
										<s:textarea name="debug.oldfunction" cols="50" rows="8"/>
									</td>
								</tr>
								<tr>
									<td height="25" align="right">
										Modify Description:
									</td>
									<td>
										<s:textarea name="debug.description" cols="50" rows="8"/>
									</td>
								</tr>
							</table>
						</s:elseif>
						<s:elseif test="%{debug.type==@com.debug.config.Constant@DEBUG_TYPE_NEWFUNCTION}">
							<table width="100%" border="1" cellpadding="0" cellspacing="0"
								style="border-collapse:collapse ">
								<tr>
									<td width="22%" height="25" align="right">
										Requirement:
									</td>
									<td width="78%">
										<s:textarea name="debug.requirement" cols="50" rows="8"/>
									</td>
								</tr>
							</table>
						</s:elseif>
						<s:elseif
							test="%{debug.type==@com.debug.config.Constant@DEBUG_TYPE_OTHER}">
							<table width="100%" border="1" cellpadding="0" cellspacing="0"
								style="border-collapse:collapse ">
								<tr>
									<td width="22%" height="25" align="right">
										Description:
									</td>
									<td width="78%">
										<s:textarea name="debug.description" cols="50" rows="8"/>
									</td>
								</tr>
							</table>
						</s:elseif>
					</td>
				</tr>
			</table>
			<br>
			<table width="15%" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr align="center">
					<td width="53%">
						<input type="submit" value="Commit ">
					</td>
					<td width="47%">
						<input type="reset" value="Reset ">
					</td>
				</tr>
			</table>
		</s:form>
	</body>
</html>
